﻿using System.ComponentModel.DataAnnotations;

namespace DevProtocolApi.Dtos.system
{
    public class UserMasterDto
    {
        public string UserId { get; set; }
        public string UserName { get; set; }
        public string Password { get; set; }
        public string UserRole { get; set; }
        public string UserPhoneNo { get; set; }
        public string UserEmail { get; set; }
        public string DeptCode { get; set; }
        public string ReportingTo { get; set; }
        public string Status { get; set; }
    }
    public class LoginResponse
    {
        public string Token { get; set; }
        public UserInfoDto UserInfo { get; set; }
        public DateTime TokenExpiry { get; set; }
        public bool NeedChangePassword { get; set; }
    }

    public class UserInfoDto
    {
        public string UserId { get; set; }
        public string UserName { get; set; }
        public string Dept { get; set; }
        public IEnumerable<string> Roles { get; set; }
    }
    public class LoginRequest
    {
        [Required(ErrorMessage = "用户名不能为空")]
        [StringLength(20, MinimumLength = 4)]
        public string userName { get; set; }

        [Required(ErrorMessage = "密码不能为空")]
        [DataType(DataType.Password)]
        [StringLength(32, MinimumLength = 6)]
        public string password { get; set; }
    }
}
